<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>opennars: nars.entity.Concept.buildTermLinks</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">opennars
   &#160;<span id="projectnumber">1.5.5</span>
   </div>
   <div id="projectbrief">1.5-ish</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="../../namespaces.html"><span>Packages</span></a></li>
      <li><a href="../../annotated.html"><span>Classes</span></a></li>
      <li><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('d4/d22/classnars_1_1entity_1_1Concept_a3f3f026223e459e041fbdd8c0f49f7c6.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="contents">
<a class="anchor" id="a3f3f026223e459e041fbdd8c0f49f7c6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void nars.entity.Concept.buildTermLinks </td>
          <td>(</td>
          <td class="paramtype">BudgetStruct&#160;</td>
          <td class="paramname"><em>taskBudget</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Recursively build TermLinks between a compound and its components. </p>
<p>called only from Memory.continuedProcess </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">taskBudget</td><td>The <a class="el" href="../../db/d8e/classnars_1_1entity_1_1BudgetValue.html" title="A triple of priority (current), durability (decay), and quality (long-term average). ">BudgetValue</a> of the task </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="../../df/d62/Concept_8java_source.html#l00281">281</a> of file <a class="el" href="../../df/d62/Concept_8java_source.html">Concept.java</a>.</p>

<p>References <a class="el" href="../../d8/d59/BudgetValue_8java_source.html#l00198">nars.entity.BudgetValue.aboveThreshold()</a>, <a class="el" href="../../df/d62/Concept_8java_source.html#l00281">nars.entity.Concept.buildTermLinks()</a>, <a class="el" href="../../de/d4e/BudgetFunctions_8java_source.html#l00169">nars.inference.BudgetFunctions.distributeAmongLinks()</a>, <a class="el" href="../../db/d0c/Memory_8java_source.html#l00176">nars.storage.Memory.getConcept()</a>, <a class="el" href="../../df/d62/Concept_8java_source.html#l00313">nars.entity.Concept.insertTermLink()</a>, and <a class="el" href="../../db/daa/TermLink_8java_source.html#l00054">nars.entity.TermLink.TRANSFORM</a>.</p>

<p>Referenced by <a class="el" href="../../df/d62/Concept_8java_source.html#l00281">nars.entity.Concept.buildTermLinks()</a>, and <a class="el" href="../../df/d62/Concept_8java_source.html#l00181">nars.entity.Concept.linkToTask()</a>.</p>
<div class="fragment"><div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;                                                        {</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;        Term t;</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;        <a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_a2aaa4a9fe0cb1841ba426f323a08b7eb.html#a2aaa4a9fe0cb1841ba426f323a08b7eb">Concept</a> concept;</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;        TermLink termLink1, termLink2;</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_a201858931ec115680ef147dc4819d92b.html#a201858931ec115680ef147dc4819d92b">termLinkTemplates</a>.size() &gt; 0) {</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;            BudgetValue subBudget = BudgetFunctions.distributeAmongLinks(taskBudget, <a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_a201858931ec115680ef147dc4819d92b.html#a201858931ec115680ef147dc4819d92b">termLinkTemplates</a>.size());</div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;            <span class="keywordflow">if</span> (subBudget.aboveThreshold()) {</div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;                <span class="keywordflow">for</span> (TermLink <span class="keyword">template</span> : <a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_a201858931ec115680ef147dc4819d92b.html#a201858931ec115680ef147dc4819d92b">termLinkTemplates</a>) {</div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;                    <span class="keywordflow">if</span> (<span class="keyword">template</span>.getType() != TermLink.TRANSFORM) {</div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;                        t = <span class="keyword">template</span>.getTarget();</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;                        concept = <a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_a2ab0b0c82e09c852076ce4c90c502d4c.html#a2ab0b0c82e09c852076ce4c90c502d4c">memory</a>.<a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory_a3f45cdc40973611106276cfbc27a7a7a.html#a3f45cdc40973611106276cfbc27a7a7a">getConcept</a>(t);</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;                        <span class="keywordflow">if</span> (concept != null) {</div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;                            termLink1 = <span class="keyword">new</span> TermLink(t, <span class="keyword">template</span>, subBudget);</div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;                            <a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_a3c69b71b1987ca4066c9b3d2a7973dd1.html#a3c69b71b1987ca4066c9b3d2a7973dd1">insertTermLink</a>(termLink1);   <span class="comment">// this termLink to that</span></div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;                            termLink2 = <span class="keyword">new</span> TermLink(<a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_a414c1b5d8ad3baa2ecdf65204b68d485.html#a414c1b5d8ad3baa2ecdf65204b68d485">term</a>, <span class="keyword">template</span>, subBudget);</div>
<div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;                            concept.insertTermLink(termLink2);   <span class="comment">// that termLink to this</span></div>
<div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;                            <span class="keywordflow">if</span> (t instanceof CompoundTerm) {</div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;                                concept.buildTermLinks(subBudget);</div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;                            }</div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;                        }</div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;                    }</div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;                }</div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;            }</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;        }</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;    }</div>
<div class="ttc" id="classnars_1_1entity_1_1Concept_a2aaa4a9fe0cb1841ba426f323a08b7eb_html_a2aaa4a9fe0cb1841ba426f323a08b7eb"><div class="ttname"><a href="../../d4/d22/classnars_1_1entity_1_1Concept_a2aaa4a9fe0cb1841ba426f323a08b7eb.html#a2aaa4a9fe0cb1841ba426f323a08b7eb">nars.entity.Concept.Concept</a></div><div class="ttdeci">Concept(Term tm, Memory memory)</div><div class="ttdoc">Constructor, called in Memory.getConcept only. </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d62/Concept_8java_source.html#l00074">Concept.java:74</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Concept_a414c1b5d8ad3baa2ecdf65204b68d485_html_a414c1b5d8ad3baa2ecdf65204b68d485"><div class="ttname"><a href="../../d4/d22/classnars_1_1entity_1_1Concept_a414c1b5d8ad3baa2ecdf65204b68d485.html#a414c1b5d8ad3baa2ecdf65204b68d485">nars.entity.Concept.term</a></div><div class="ttdeci">Term term</div><div class="ttdoc">The term is the unique ID of the concept. </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d62/Concept_8java_source.html#l00050">Concept.java:50</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_a3f45cdc40973611106276cfbc27a7a7a_html_a3f45cdc40973611106276cfbc27a7a7a"><div class="ttname"><a href="../../d8/df4/classnars_1_1storage_1_1Memory_a3f45cdc40973611106276cfbc27a7a7a.html#a3f45cdc40973611106276cfbc27a7a7a">nars.storage.Memory.getConcept</a></div><div class="ttdeci">Concept getConcept(Term term)</div><div class="ttdoc">Get the Concept associated to a Term, or create it. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l00176">Memory.java:176</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Concept_a2ab0b0c82e09c852076ce4c90c502d4c_html_a2ab0b0c82e09c852076ce4c90c502d4c"><div class="ttname"><a href="../../d4/d22/classnars_1_1entity_1_1Concept_a2ab0b0c82e09c852076ce4c90c502d4c.html#a2ab0b0c82e09c852076ce4c90c502d4c">nars.entity.Concept.memory</a></div><div class="ttdeci">Memory memory</div><div class="ttdoc">Reference to the memory. </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d62/Concept_8java_source.html#l00063">Concept.java:63</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Concept_a201858931ec115680ef147dc4819d92b_html_a201858931ec115680ef147dc4819d92b"><div class="ttname"><a href="../../d4/d22/classnars_1_1entity_1_1Concept_a201858931ec115680ef147dc4819d92b.html#a201858931ec115680ef147dc4819d92b">nars.entity.Concept.termLinkTemplates</a></div><div class="ttdeci">ArrayList&lt; TermLink &gt; termLinkTemplates</div><div class="ttdoc">Link templates of TermLink, only in concepts with CompoundTerm jmv TODO explain more. </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d62/Concept_8java_source.html#l00057">Concept.java:57</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Concept_a3c69b71b1987ca4066c9b3d2a7973dd1_html_a3c69b71b1987ca4066c9b3d2a7973dd1"><div class="ttname"><a href="../../d4/d22/classnars_1_1entity_1_1Concept_a3c69b71b1987ca4066c9b3d2a7973dd1.html#a3c69b71b1987ca4066c9b3d2a7973dd1">nars.entity.Concept.insertTermLink</a></div><div class="ttdeci">void insertTermLink(TermLink termLink)</div><div class="ttdoc">Insert a TermLink into the TermLink bag. </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d62/Concept_8java_source.html#l00313">Concept.java:313</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d4/d22/classnars_1_1entity_1_1Concept_a3f3f026223e459e041fbdd8c0f49f7c6_a3f3f026223e459e041fbdd8c0f49f7c6_cgraph.svg" width="100%" height="518"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</p>

<p><div id="dynsection-1" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-1-trigger" src="../../closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-1-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-1-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d4/d22/classnars_1_1entity_1_1Concept_a3f3f026223e459e041fbdd8c0f49f7c6_a3f3f026223e459e041fbdd8c0f49f7c6_icgraph.svg" width="100%" height="388"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../d7/d81/namespacenars.html">nars</a></li><li class="navelem"><a class="el" href="../../db/dec/namespacenars_1_1entity.html">entity</a></li><li class="navelem"><a class="el" href="../../d4/d22/classnars_1_1entity_1_1Concept.html">Concept</a></li>
    <li class="footer">Generated on Sun Jan 10 2016 18:03:58 for opennars by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
  </ul>
</div>
</body>
</html>
